package com.laviedesfons.jhmtasc.metadata;

/**
 *
 * @author Romano
 */
public class MetaField {

    private int id;
    private String fieldName = null;
    private MetaModel container = null;
    private MetaType metaType = null;
    private String flag;
    private Kind kind = Kind.OFFSET;

    public enum Kind {
        OFFSET,
        VALUE;
    }

    MetaField(MetaModel t) {
        container = t;
    }

    public String getFlag() {
        return flag;
    }

    void setFlag(String flag) {
        this.flag = flag;
    }

    public MetaType getMetaType() {
        return metaType;
    }

    public Kind getKind(){
        return kind;
    }

    public MetaModel getContainer() {
        return container;
    }

    public String getFieldName() {
        return fieldName;
    }

    public int getId() {
        return id;
    }

    void setMetaType(MetaType m){
        metaType = m;
    }

    void setKind(Kind k){
        kind = k;
    }

    void setContainer(MetaModel container) {
        this.container = container;
    }

    void setFieldName(String fieldName) {
        this.fieldName = fieldName;
    }

    void setId(int id) {
        this.id = id;
    }

    @Override
    public String toString() {
        return MetaField.class.getSimpleName()+"{"
                + "id=" + id
                + ", flag="  + flag
                + ", fieldName=" + fieldName
                + ", container=" + container
                + ", metaType=" + metaType.toString()
                + ", kind=" + kind
                + '}';
    }
}
